import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

Future<T> showBottomDialog<T>({
  required BuildContext context,
  double? radius,
  bool? isScrollControlled,
  required Widget builder,
}) async {
  T value = await showModalBottomSheet(
    context: context,
    isScrollControlled: isScrollControlled ?? false,
    backgroundColor: Colors.transparent,
    clipBehavior: Clip.antiAlias,
    shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius ?? 9.r)),
    builder: (BuildContext context) => builder,
  );
  return value;
}
